package com.wing.wcabinet.model.request;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import com.wing.wcabinet.model.entity.WcabCellInventoryInout;
import java.time.LocalDateTime;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * 售刀柜上货(上货主表无展示)/领取Form
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class WcabCellInventoryInoutForm {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 存刀任务编号
     */
    private String code;

    /**
     * 配送单id
     */
    private Long deliveryId;

    /**
     * 操作类型
     */
    private WcabCellInventoryInout.InoutType inoutType;

    /**
     * no
     */
    private Integer no;

    /**
     * day
     */
    private Integer day;

    /**
     * 设备台机
     */
    private String deviceCode;

    /**
     * 是否已同步：no(0,未同步);yes(1,已同步);
     */
    private Integer isSyns;

    /**
    * 同步时间
    */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime synsTime;

    /**
     * 是否已形成账单
     */
    private WcabCellInventoryInout.IsBill isBill;

    /**
     * 上货记录id
     */
    private Long receiveLoadId;

    /**
     * enterpriseId
     */
    private Long enterpriseId;

    /**
     * 工序id
     */
    private Long processId;

    /**
     * 计划id
     */
    private Long planId;

    /**
     * enterpriseCode
     */
    private String enterpriseCode;

    /**
     * 业务类型
     */
    private WcabCellInventoryInout.BusinessType businessType;


    public interface Add{}

    public interface Update{}

    List<WcabCellInventoryInoutDetailForm> detailList;

    private WcabCellInventoryInout.OperationType operationType;

    private String operationTypeDesc;

    public String getOperationTypeDesc(){
        if (operationType!=null){
            return operationType.getDesc();
        }
        return "";
    }

    private String cabCode;

    private Long categoryId;

    private Long allocationId;


    private Boolean flag;


    private Long workOrderId;


    private Long departmentId;

    private String departmentName;

    private Boolean skuFlag;

    private Boolean isCorrect;

    private Boolean businessTypeCorrect;

    private Boolean skuCorrect;

    private String remark;



    /**
     * 状态
     */
    private WcabCellInventoryInout.Status status;

    /**
     * 状态描述
     */
    @TableField(exist = false)
    private String statusDesc;

    public String getStatusDesc() {
        return status == null ? null : status.getDesc();
    }

    /**
     * 盘验时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime checkTime;

    /**
     * 盘验人id
     */
    private Long checkUserId;

    /**
     * 盘验人
     */
    private String checkUserName;

    /**
     * 通知时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime notifyTime;

    /**
     * 通知人
     */
    private Long notifyUserId;

    /**
     * 通知人
     */
    private String notifyUserName;

    /**
     * 回收人id
     */
    private Long takeUserId;

    /**
     * 回收人
     */
    private String takeUserName;

    /**
     * 回收时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime takeTime;

    /**
     * 盘验完操作类型
     */
    private Integer operationTypeChecked;

    /**
     * 盘验完业务类型
     */
    private WcabCellInventoryInout.BusinessTypeChecked businessTypeChecked;

    /**
     * 签收人id
     */
    private String signUserId;

    /**
     * 签收时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime signTime;

    /**
     * 签收人
     */
    private String signUserName;

    /**
     * 盘验结果id
     */
    private Long checkedResultId;

    /**
     * 通知供应商id
     */
    private Long supplierId;

    /**
     * 通知供应商
     */
    private String supplierName;

    /**
     * 盘验：0：否，1：是
     */
    private Boolean isCheck;

    /**
     * supplierCompanyId
     */
    private Long supplierCompanyId;

    /**
     * 姓名
     */
    private String creatorNickname;


    /**
     * businessTypePre
     */
    private WcabCellInventoryInout.BusinessTypePre businessTypePre;
    /**
     * useInventoryInoutId
     */
    private Long useInventoryInoutId;

    /**
     * checkInventoryInoutId
     */
    private Long checkInventoryInoutId;

    /**
     * storageInventoryOutId
     */
    private Long storageInventoryOutId;

    private Long storesRequisitionId;

    private Boolean weightFlag;

    private String skuChecked;

    private Boolean quantityFlag;


    private Boolean weightCorrect;

    private Boolean quantityCorrect;


    private String orderCode;


}
